package com.mhkj.revise.plan.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.jeecgframework.poi.excel.annotation.Excel;

import com.mhkj.base.busiMode.entity.BusiModel;
import com.mhkj.base.busiType.entity.BusinessType;
import com.mhkj.base.templete.entity.PlanTempleteData;
import com.mics.core.common.validate.annotation.NotNull;
import com.mics.core.common.validate.annotation.Validate;
import com.mics.core.system.base.entity.BaseDomain;
import com.mics.core.system.rbac.entity.Dictionary;

/**
 * 计划节点
 * 
 * @author mics
 * @date 2018年7月5日
 * @version 1.0
 */
@Entity
@Table(name = "t_plan_node")
@Validate
public class PlanNode extends BaseDomain {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 6549120844181038972L;
	/**
	 * 计划
	 */
	@Excel(name = "plan_id", isImportField = "plan_id")
	@JoinColumn(name = "plan_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private Plan plan;

	/**
	 * 节点关联模板数据
	 */
	@Excel(name = "node_templete_data_id", isImportField = "node_templete_data_id")
	@JoinColumn(name = "node_templete_data_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private PlanTempleteData nodeTempleteDataId;

	/**
	 * 节点编号
	 */
	@Excel(name = "NO", isImportField = "NO")
	@Column(name = "NO", length = 48)
	private String NO;

	/**
	 * 节点名称
	 */
	@Excel(name = "node_name", isImportField = "node_name")
	@Column(name = "node_name", length = 48)
	@NotNull(message = "节点名称不能为空！")
	private String nodeName;

	/**
	 * 业务模块
	 */
	@Excel(name = "business_id", isImportField = "business_id")
	@JoinColumn(name = "business_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private BusinessType business;

	/**
	 * 节点性质
	 */
	@Excel(name = "node_property_id", isImportField = "node_property_id")
	@NotNull(message = "节点性质不能为空")
	@JoinColumn(name = "node_property_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private Dictionary nodeProperty;

	/**
	 * 完成标准
	 */
	@Excel(name = "complete_standard", isImportField = "complete_standard")
	@Column(name = "complete_standard", length = 128)
	private String completeStandard;

	/**
	 * 开始时间
	 */
	@Excel(name = "begin_date", isImportField = "begin_date")
	@Column(name = "begin_date")
	@Temporal(TemporalType.DATE)
	private Date beginDate;
	/**
	 * 结束时间
	 */
	@Excel(name = "end_date", isImportField = "end_date")
	@Column(name = "end_date")
	@Temporal(TemporalType.DATE)
	private Date endDate;

	/**
	 * 工期
	 */
	@Excel(name = "deadline", isImportField = "deadline")
	@Column(name = "deadline")
	private int deadline = 0;

	/**
	 * 工期说明
	 */
	@Excel(name = "deadline_desc", isImportField = "deadline_desc")
	@Column(name = "deadline_desc")
	private String deadlineDesc;

	/**
	 * 进度（百分位）
	 */
	@Excel(name = "rate", isImportField = "rate")
	private int rate;

	/**
	 * 正常推迟天数
	 */
	@Excel(name = "delay_day", isImportField = "delay_day")
	@Column(name = "delay_day")
	private int delayDay = 0;

	/**
	 * 延期到时间
	 */
	@Excel(name = "delay_date", isImportField = "delay_date")
	@Column(name = "delay_date")
	private Date delayDate;
	/**
	 * 延期次数
	 */
	@Excel(name = "delay_num", isImportField = "delay_num")
	@Column(name = "delay_num")
	private Integer delayNum=0;

	/**
	 * 逾期天数
	 */
	@Excel(name = "over_day", isImportField = "over_day")
	@Column(name = "over_day")
	private int overDay = 0;
	/**
	 * 责任单位
	 */
	@Excel(name = "company_id", isImportField = "company_id")
	@Column(name = "company_id", length = 48)
	private String companyId;

	/**
	 * 责任单位
	 */
	@Transient
	private String companyName;
	/**
	 * 责任部门
	 */
	@Excel(name = "office_id", isImportField = "office_id")
	@Column(name = "office_id", length = 48)
	private String officeId;

	/**
	 * 部门名称
	 */
	@Transient
	private String officeName;
	/**
	 * 责任岗位
	 */
	@Excel(name = "post_id", isImportField = "post_id")
	@Column(name = "post_id", length = 48)
	private String postId;
	

	/**
	 * 岗位名称
	 */
	@Transient
	private String postName;

	/**
	 * 监督
	 */
	@Excel(name = "supervise", isImportField = "supervise")
	@Column(name = "supervise", length = 48)
	private String supervise;

	/**
	 * 模块
	 */
	@Excel(name = "model_id", isImportField = "model_id")
	@JoinColumn(name = "model_id")
	@ManyToOne(fetch = FetchType.LAZY)
	private BusiModel busiModel;

	/**
	 * 备注
	 */
	@Excel(name = "remark", isImportField = "remark")
	@Column(name = "remark")
	private String remark;

	/**
	 * 状态:1未开始、2进行中 、5、已完成 6、延期完成 7、逾期 8、节点暂停9、节点取消
	 */
	@Excel(name = "state", isImportField = "state")
	@Column(name = "state")
	private int state = 1;

	/**
	 * 风险状态  0 无状态 1、有风险  2、失控
	 */
	@Excel(name = "risk_state", isImportField = "risk_state")
	@Column(name="risk_state")
	private int riskState=0;
	
	/**
	 * 完成时间
	 */
	@Excel(name = "complete_date", isImportField = "complete_date")
	@Column(name = "complete_date")
	@Temporal(TemporalType.DATE)
	private Date completeDate;
	
	/**
	 * 罚款 金额
	 */
	@Excel(name = "fine_money", isImportField = "fine_money")
	@Column(name="fine_money",length=48)
	private String fineMoney="0";
	

	/**
	 * 状态:0未提交 1审核中, 2审核成功,3 审核失败
	 */
	@Excel(name = "aduit_state", isImportField = "aduit_state")
	@Column(name = "aduit_state")
	private int aduitState = 0;
	
	
	/**
	 * 关注 0未关注  1关注
	 */
	@Transient
	private int care = 0;
	

	/**
	 * 成果类型 标识
	 */
	@Transient
	private String fruitType;
	
	
	public String getFineMoney() {
		return fineMoney;
	}

	public void setFineMoney(String fineMoney) {
		this.fineMoney = fineMoney;
	}

	public Date getDelayDate() {
		return delayDate;
	}

	public void setDelayDate(Date delayDate) {
		this.delayDate = delayDate;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getNO() {
		return NO;
	}

	public void setNO(String nO) {
		NO = nO;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public int getDeadline() {
		return deadline;
	}

	public void setDeadline(int deadline) {
		this.deadline = deadline;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getCompleteStandard() {
		return completeStandard;
	}

	public void setCompleteStandard(String completeStandard) {
		this.completeStandard = completeStandard;
	}

	public String getOfficeId() {
		return officeId;
	}

	public void setOfficeId(String officeId) {
		this.officeId = officeId;
	}

	public String getOfficeName() {
		return officeName;
	}

	public void setOfficeName(String officeName) {
		this.officeName = officeName;
	}

	public Plan getPlan() {
		return plan;
	}

	public void setPlan(Plan plan) {
		this.plan = plan;
	}


	public BusiModel getBusiModel() {
		return busiModel;
	}

	public void setBusiModel(BusiModel busiModel) {
		this.busiModel = busiModel;
	}

	public int getDelayDay() {
		return delayDay;
	}

	public void setDelayDay(int delayDay) {
		this.delayDay = delayDay;
	}

	public int getOverDay() {
		return overDay;
	}

	public void setOverDay(int overDay) {
		this.overDay = overDay;
	}	

	public int getRate() {
		return rate;
	}

	public void setRate(int rate) {
		this.rate = rate;
	}

	public Date getCompleteDate() {
		return completeDate;
	}

	public void setCompleteDate(Date completeDate) {
		this.completeDate = completeDate;
	}

	public Dictionary getNodeProperty() {
		return nodeProperty;
	}

	public void setNodeProperty(Dictionary nodeProperty) {
		this.nodeProperty = nodeProperty;
	}

	public String getDeadlineDesc() {
		return deadlineDesc;
	}

	public void setDeadlineDesc(String deadlineDesc) {
		this.deadlineDesc = deadlineDesc;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getPostId() {
		return postId;
	}

	public void setPostId(String postId) {
		this.postId = postId;
	}

	public String getPostName() {
		return postName;
	}

	public void setPostName(String postName) {
		this.postName = postName;
	}

	public String getSupervise() {
		return supervise;
	}

	public void setSupervise(String supervise) {
		this.supervise = supervise;
	}

	public PlanTempleteData getNodeTempleteDataId() {
		return nodeTempleteDataId;
	}

	public void setNodeTempleteDataId(PlanTempleteData nodeTempleteDataId) {
		this.nodeTempleteDataId = nodeTempleteDataId;
	}

	public Integer getDelayNum() {
		return delayNum;
	}

	public void setDelayNum(Integer delayNum) {
		this.delayNum = delayNum;
	}


	public int getRiskState() {
		return riskState;
	}

	public void setRiskState(int riskState) {
		this.riskState = riskState;
	}

	public BusinessType getBusiness() {
		return business;
	}

	public void setBusiness(BusinessType business) {
		this.business = business;
	}

	public int getCare() {
		return care;
	}

	public void setCare(int care) {
		this.care = care;
	}

	public int getAduitState() {
		return aduitState;
	}

	public void setAduitState(int aduitState) {
		this.aduitState = aduitState;
	}

	public String getFruitType() {
		return fruitType;
	}

	public void setFruitType(String fruitType) {
		this.fruitType = fruitType;
	}

	
	
	
	
}
